package com.tangsm.spring.boot.async.service.impl;

import com.tangsm.spring.boot.async.domain.UserInfo;
import com.tangsm.spring.boot.async.service.TaskThreadService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * 并发业务处理接口实现类
 *
 * @author tangsm
 */
@Service
public class TaskThreadServiceImpl implements TaskThreadService {
    private static final Logger log = LoggerFactory.getLogger(TaskThreadServiceImpl.class);
    /**
     * 执行业务
     *
     * @param userInfo 用户信息
     * @return 结果
     */
    @Override
    public String exec(UserInfo userInfo) {
        String user = userInfo.toString();
        log.info(user);
        return user;
    }
}
